package com.springboot.listener;

import com.springboot.event.LoginEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

@Component
public class AnnotationListener {

    @EventListener
    public void execute(LoginEvent event){
        System.out.println(event.getSource()+" 通过 @EventListener方式登录发布事件");

    }
}
